From 5a07d757fb2f8b993f02ba1258413e628dd8d85c Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 21 Jun 2007 12:10:01 +0100 Subject: [PATCH] libxenguest: Add another range check to dom restore. Signed-off-by: Keir Fraser --- tools/libxc/xc_domain_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index 3193ce191c..e7ff90dcfd 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -465,7 +465,7 @@ int xc_domain_restore(int xc_handle, int io_fd, uint32_t dom, if ( j == 0 ) break; /* our work here is done */ - if ( j > MAX_BATCH_SIZE ) + if ( (j > MAX_BATCH_SIZE) || (j < 0) ) { ERROR("Max batch size exceeded. Giving up."); goto out; -- 2.30.2